package com.example.stujava.module.xiangxue.retrofit;

import com.example.stujava.module.xiangxue.retrofit.annotation.Field;
import com.example.stujava.module.xiangxue.retrofit.annotation.GET;
import com.example.stujava.module.xiangxue.retrofit.annotation.POST;
import com.example.stujava.module.xiangxue.retrofit.annotation.Query;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.FormUrlEncoded;

public interface IWeatherApi {

    @POST("/v3/weather/weatherInfo")
    @FormUrlEncoded
    Call<ResponseBody> postWeather(@Field("city") String city, @Field("key") String key);

    @GET("/v3/weather/weatherInfo")
    Call<ResponseBody> getWeather(@Query("city") String city, @Query("key") String key);
}
